import request from "./request";

// 封装数据请求API

// 获取过去一周的用户注册数据
export function getRegisterUserData() {
    return request({
        url: '/backstage/user/registerStatistic',
        method: 'get',
    })
}

export function getArticleOfWeek() {
    return request({
        url: '/backstage/article/createdArticleOfWeek',
        method: 'get'
    })
}

export function getVideoOfWeek() {
    return request({
        url: '/backstage/video/createdVideoOfWeek',
        method: 'get'
    })
}

export function videoCategoryCount() {
    return request({
        url: "/backstage/video/categoryCount",
        method: 'get'
    })
}

// 获取过去一周内的视频特定的类目数据（echarts堆叠图）
export function videoCategoryCountOfWeek(categoryName) {
    return request({
        url: 'backstage/video/categoryCountOfWeek',
        method: 'get',
        params: {
            categoryName
        }
    })
}

// 获取过去一周内的文章特定的类目数据（echarts堆叠图）
export function articleCategoryCountWeek(categoryName) {
    return request({
        url: '/backstage/article/createdCategoryOfWeek',
        method: 'get',
        params: {
            categoryName
        }
    })

}